<?php
include '../config/config.php';
include "../lib/user.php";

$config=new config();
$config->connect();

session_start();
if (!isset($_SESSION['MM_Username'])){
	$togo="../login.php";
	header ("Location:$togo");
}

$User_Dao= new User_Dao();
$User= $User_Dao-> get_id($_SESSION['MM_Id']);

if (ISSET($_POST["email"]) && $_POST["email"]!=""){
$user=new user();
$user->id=$_SESSION['MM_Id'];
$user->email=$_POST["email"];

$User_Dao->edit_email($user);

		
}
?>

<?php include("header_admin.php") ?>
<?php include("menu_kiri_admin.php") ?>
<style type="text/css">
<!--
.style1 {
	font-size: 24px;
	font-weight: bold;
	color: #990033;
}
-->
</style>

<div id="body">
<div class="topbox">
<p align="center" class="style1">Ubah Profil</p>
<p>Silhkan Merubah Profil Anda</p>
<form id="form1" name="form1" method="post" action="">
  <label></label>
  <div align="justify">
    <p align="left">Email :    </p>
    <p align="left">
      <input name="email" type="text" id="email" value="<?php echo $User->email; ?>" />
    </p>
  </div>
  <div align="left">
    <input type="submit" name="Simpan" id="Simpan" value="Simpan " />  
     <input type="button" name="Batal" id="Batal" value="Batal" onClick="window.location.href='beranda_admin.php'"/>
     
  </div>
  <p align="left">
    <label></label>
</p>
</form>
<p>&nbsp;</p>

</div>
</div>
<div class="clear"></div>
         <?php include("../footer.php") ?>
